import Annotation.InitMethod;
import com.xxx.MyClass;

import java.io.*;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Properties;

public class MainClass {
    public static void main(String[] args) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {
        Properties properties = new Properties();
        InputStream in = new FileInputStream("src/main/resources/myapp.properties");
        properties.load(in);
        Class myClass = Class.forName(properties.getProperty("bootstrapClass"));
        Object c1 = myClass.newInstance();
        //myClass c1 = new myClass();
        Method init = myClass.getDeclaredMethod("init");
        init.invoke(c1);



    }
}
